From: Aryeh Gregor Date: Thu, 5 Feb 2009 23:41:00 +0000 (+0000) Subject: Make parserTests.php more git bisect-friendly X-Git-Tag: 1.31.0-rc.0~43016 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=960889ec74b12332acd45eda29c0845cec34b762;p=lhc%2Fweb%2Fwiklou.git Make parserTests.php more git bisect-friendly Now the following commands can track down parser test regressions (if you're using git svn, of course): git bisect start bad-rev good-rev git bisect run maintenance/parserTests.php --regex 'Test name' Just type those in (replacing "bad-rev" and "good-rev" with revision ids, and 'Test name' with a regex that uniquely matches the regressing test's name), and git will magically find the first bad revision for you in a couple of minutes. (Then run git bisect reset to get back to normal.) All I changed to make this possible was changing the error return code from 255 (-1) to 1. git bisect treats 1-124 and 126-127 as error codes, but for some reason doesn't like 128-255. --- diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index 0d50feb1ac..9a1a4807c7 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -71,5 +71,5 @@ if ( isset( $options['fuzz'] ) ) { $tester->fuzzTest( $files ); } else { $ok = $tester->runTestsFromFiles( $files ); - exit ($ok ? 0 : -1); + exit ($ok ? 0 : 1); }